package com.qingxin.sys.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 微信用户
 * @author Administrator
 *
 */
@Entity
@Table(name = "wx_user")
public class WxUser extends BaseEntity implements java.io.Serializable {

	private static final long serialVersionUID = 6614407521663494308L;

	private String wxuserid;
	private String loginName;
	private String phone;
	private String wechat;
	private String passwd;
	private String username;
	private String nickname;
	private String regionid;
	private String address;
	private Date createTime;
	private String photo;
	private Integer loginModified;
	private String tokenid;
	private String sex;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date birth;
	private String remark;
	
	public WxUser() {
	}
	
	public WxUser(String wxuserid) {
		this.wxuserid = wxuserid;
	}


	public WxUser(String wxuserid, String loginName, String phone, String wechat,
			String passwd, String username, String nickname, String regionid, String address,
			Date createTime, String photo, Integer loginModified,
			String tokenid, String sex, Date birth) {
		this.wxuserid = wxuserid;
		this.loginName = loginName;
		this.phone = phone;
		this.wechat = wechat;
		this.passwd = passwd;
		this.username = username;
		this.nickname = nickname;
		this.regionid = regionid;
		this.address = address;
		this.createTime = createTime;
		this.photo = photo;
		this.loginModified = loginModified;
		this.tokenid = tokenid;
		this.sex = sex;
		this.birth = birth;
	}


	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "wxuserid", unique = true, nullable = false, length = 32)
	public String getWxuserid() {
		return wxuserid;
	}
	public void setWxuserid(String wxuserid) {
		this.wxuserid = wxuserid;
	}

	@Column(name = "login_name" ,length=50)
	public String getLoginName() {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	
	@Column(name = "phone", length = 20)
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Column(name = "wechat", length = 50)
	public String getWechat() {
		return wechat;
	}
	public void setWechat(String wechat) {
		this.wechat = wechat;
	}

	@Column(name = "passwd", length = 50)
	public String getPasswd() {
		return passwd;
	}
	public void setPasswd(String passwd) {
		this.passwd = passwd;
	}
	
	@Column(name = "username", length = 50)
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	
	@Column(name = "nickname", length = 50)
	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	@Column(name = "regionid", length = 50)
	public String getRegionid() {
		return regionid;
	}
	public void setRegionid(String regionid) {
		this.regionid = regionid;
	}

	@Column(name = "address" ,length=200)
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "photo" ,length=100)
	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	@Column(name = "create_time", length = 23)
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "login_modified")
	public Integer getLoginModified() {
		return loginModified;
	}
	public void setLoginModified(Integer loginModified) {
		this.loginModified = loginModified;
	}

	@Column(name = "tokenid",length=16)
	public String getTokenid() {
		return tokenid;
	}

	public void setTokenid(String tokenid) {
		this.tokenid = tokenid;
	}

	@Column(name = "sex",length=10)
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}


	@Column(name = "birth",length=23)
	public Date getBirth() {
		return birth;
	}

	public void setBirth(Date birth) {
		this.birth = birth;
	}

	@Column(name = "remark",length=1000)
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
}
